﻿using FPSO.Models.Domain;
using FPSO.Models.ViewModel.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPSO.Services.Utils
{
    /// <summary>
    /// 模拟器引擎，可以根据各个舱室当前情况 以及 任务安排 模拟任一时刻所有舱室的状态
    /// </summary>
    public static class ImitateEngine
    {
        public static void CalcTaskState(DateTime CurrentTime, List<TankTask> TaskList, List<TankViewModel> CurrentTankViewList)
        {
            Dictionary<string, TankViewModel> viewDic = new Dictionary<string, TankViewModel>();
            Dictionary<int, List<TankTask>> preTaskDic = new Dictionary<int, List<TankTask>>();

            foreach(TankViewModel view in CurrentTankViewList)
            {
                viewDic.Add(view.TankId, view);
            }

            foreach(TankTask task in TaskList)
            {
                preTaskDic.Add(task.PreTaskId, new List<TankTask>() { task });
            }
        }
    }
}
